#include "guess.hpp"

Item::Item()
{
    std::random_device seed;
    std::mt19937 rand(seed());
    std::uniform_int_distribution<int> dist(0, 1000);
    price = dist(rand);
    std::cout << __FUNCTION__ << " called." << std::endl;
}
Item::~Item()
{
    std::cout << __FUNCTION__ << " called." << std::endl;
}
// int Item::getPrice()
// {
//     return price;
// }
bool Item::comparePrice(int num)
{
    if (num == price)
    {
        std::cout << "You guess right!" << std::endl;
        return true;
    }
    else
    {
        if (num > price)
            std::cout << "Price is lower." << std::endl;
        else
            std::cout << "Price is higher." << std::endl;
        return false;
    }
}